using MicroMsg.Common.Event;
using MicroMsg.Storage;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.UserContrl
{
	public class SendFailedHintItem : UserControl
	{
		public delegate void ListItemClick(object sender, object object_0);
		private const string TAG = "SendFailedHintItem";
		public SnsInfo mInfo;
		private bool mBIsFirstLoaded = true;
		private EventWatcher mWatchxxx;
		private object mObjectWatcher = new object();
		internal ClickEffectGrid root;
		internal Image image;
		internal TextBlock txtMsgCnt;
		private bool _contentLoaded;
		public event SendFailedHintItem.ListItemClick ItemClick;
		public SendFailedHintItem()
		{
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.Control_Loaded));
			base.add_Unloaded(new RoutedEventHandler(this.Control_Unloaded));
		}
		private void Control_Loaded(object sender, RoutedEventArgs e)
		{
		}
		private void Control_Unloaded(object sender, RoutedEventArgs e)
		{
		}
		private void registerEvent()
		{
			if (this.mWatchxxx == null)
			{
				this.mWatchxxx = new EventWatcher(this.mObjectWatcher, null, new EventHandlerDelegate(this.Onxxx));
				EventCenter.registerEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchxxx);
			}
		}
		private void unRegisterEvent()
		{
			if (this.mWatchxxx != null)
			{
				EventCenter.removeEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchxxx);
				this.mWatchxxx = null;
			}
		}
		private void Onxxx(EventWatcher watcher, BaseEventArgs evtArgs)
		{
			if (evtArgs == null)
			{
				return;
			}
		}
		private void btnLayoutRoot_mClicked(object sender, object object_0)
		{
			if (this.ItemClick != null)
			{
				this.ItemClick(this, this.mInfo);
			}
		}
		public static SendFailedHintItem GetOneItem(SnsInfo info)
		{
			return new SendFailedHintItem
			{
				mInfo = info
			};
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Common/UI/SendFailedHintItem.xaml", 2));
			this.root = (ClickEffectGrid)base.FindName("root");
			this.image = (Image)base.FindName("image");
			this.txtMsgCnt = (TextBlock)base.FindName("txtMsgCnt");
		}
	}
}
